package com.wxzz.elearing.course.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.wxzz.elearning.common.bean.BaseEntity;
import com.wxzz.elearning.common.dto.FeignWxUserDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 我的课程
 * 内部课程（企业自己发布用户看过的课程）
 * 外部课程（自己购买的和企业购买的平台课程，这里的平台课程是看过的)
 * </p>
 *
 * @author
 * @since 2021-03-15
 */
@Data
@ApiModel(value = "WxUserCurriculum对象", description = "我的课程")
public class WxUserCurriculum extends BaseEntity {

    private Long wxUserId;

    @ApiModelProperty(value = "课程id")
    private Long curriculumId;

    @ApiModelProperty(value = "0-已浏览 1-已购买")
    private Integer status;

    @ApiModelProperty(value = "订单id")
    private Long userOrderId;

    @ApiModelProperty(value = "是否收藏 0-否 1-是")
    private Integer isCollect;

    @ApiModelProperty(value = "评星 -1未评星")
    private BigDecimal startLevel;

    @ApiModelProperty(value = "该课程学习时长")
    private Long curriculumStudyTime;

    @ApiModelProperty(value = "购买的用户企业id")
    private Long enterpriseId;

    @TableField(exist = false)
    @ApiModelProperty(value = "学习位置")
    private String sectionName;

    @TableField(exist = false)
    @ApiModelProperty(value = "昵称")
    private String nickname;

    @TableField(exist = false)
    @ApiModelProperty(value = "头像")
    private String icon;

    @TableField(exist = false)
    @ApiModelProperty(value = "手机号")
    private String phone;

    @TableField(exist = false)
    @ApiModelProperty(value = "企业名称")
    private String enterpriseName;

    @TableField(exist = false)
    //@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "学习时长")
    private double studyTime;

    @TableField(exist = false)
    @ApiModelProperty(value = "完成课时")
    private Long finishClass;

    @TableField(exist = false)
    //@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "今日学习时长")
    private double todayStudyTime;

    @TableField(exist = false)
    @ApiModelProperty(value = "学习进度")
    private BigDecimal studySchedule;

    @TableField(exist = false)
    @ApiModelProperty(value = "上一级部门名称")
    private String lastOrganizationName;

    @TableField(exist = false)
    @ApiModelProperty(value = "部门名称")
    private String organizationName;

    @TableField(exist = false)
    @ApiModelProperty(value = "职位名称")
    private String identityName;

}
